
<?php echo $html->script(array('jquery')); ?>
    <script type="text/javascript">
		$(document).ready(function(){
		  if(<?php $isFilter != null ?>)
		    $(".filter").addClass("hidden");
		  
		});
	</script>
<?php
$paginator->options(array(
			'update' => '#content', 
			'evalScripts' => true,
			'before' => $js->get('#content')->effect('fadeOut', array('buffer' => false)),
			'success' => $js->get('#content')->effect('fadeIn', array('buffer' => false))
));

?>
<div class="content-box">
<div class="box-body">
<div class="box-header clear">
<ul class="tabs clear">
<?php if($isFilter == null) echo ('<li><button type="button" class="button black" onclick="$(\'.filter\').slideToggle();">Bộ lọc</button></li>'); ?>
	<li><?php echo $html->link('Xuất Excel', array('action'=>'exportXls')); ?></li>
	<li><?php echo $html->link("Thêm", array('action'=>'add')); ?></li>
</ul>

<h2>QUẢN LÝ DANH MỤC TÔN GIÁO</h2>
</div>

<div class="box-wrap clear"><!-- TABLE -->
<div id="table">
<?php if($isFilter == null) echo ('<div class="bt-space10 filter hidden">'); 
else echo ('<div class="bt-space10 filter">');
?> 

<?php echo $form->create('Religion', array('action'=>'index')) ?>
<div class="columns clear bt-space15">
	<div class="col2-3">
		<?php 
			echo $form->input('religion', array('label'=>array('class'=>'form-label size-120 fl-space2', 'text'=>'Tôn giáo: <span class="required">*</span>'), 'div'=>'form-field clear', 'type'=>'text', 'class'=>'required text fl-space2'));
		?>
	</div>
</div>

<div class="rule2"></div>

<div class="form-field clear"><input type="submit" class="button red"
	value="Tìm" /></div>
<!-- /.form-field --> <?php echo $form->end(); ?></div>


<?php echo $form->create('Religion') ?>
<table class="style1">
	<thead>
		<tr>
			<th><input type="checkbox" class="checkbox select-all" /></th>
			<th><?php echo $paginator->sort('Mã số', 'id'); ?></th>
			<th><?php echo $paginator->sort('Tôn giáo', 'religion'); ?></th>
			<th>Quản lý</th>
		</tr>
	</thead>

	<tbody>
	<?php foreach ($religions as $religion) {
		?>
		<tr>

			<td><?php echo $form->checkbox('SelectedRs.'.$religion['Religion']['id'], array('value' => $religion['Religion']['id'])); ?></td>
			<td><?php echo $religion['Religion']['id'] ?></td>
			<td><?php echo $religion['Religion']['religion'] ?></td>
			<td>
			<?php echo $html->image("admin/ico_edit_16.png", array(
						"alt" => "Sửa",
						'url' => array('controller' => 'religions', 'action' => 'edit', $religion['Religion']['id'])
			)); ?> 
			<?php echo $html->image("admin/ico_delete_16.png", array(
						"alt" => "Xóa",
						'url' => array('controller' => 'religions', 'action' => 'delete', $religion['Religion']['id']),
						'onclick'=>'return confirm(\'Bạn có chắc muốn xóa?\')'
						)); ?>
			
			</td>

		</tr>
		<?php } ?>
	</tbody>
</table>

<div class="tab-footer clear">
<div class="fl"><select name="dropdown" class="fl-space"
	onchange="this.form.action=this.value";>
	<option value="">Thao tác...</option>
	<option value="religions/delMulti">Xóa hàng loạt</option>
</select> <input type="submit" value="Đồng ý" id="submit2"
	class="button fl-space" /></div>
		<?php echo $this->element('paginator'); ?></div>
		<?php echo $form->end(); ?></div>
<!-- /#table --></div>
<!-- end of box-wrap --></div>
<!-- end of box-body -->
<!-- end of content-box -->

		<?php echo $js->writeBuffer(); ?>